package edu.kjxy.day03.t8;

/**
 * 功能:同步代码块和synchronized方法一样也是锁定当前对象的
 * 作者:程序员欧阳子韩
 * 日期:2024/2/2 18:45
 */
public class RunTest {
    public static void main(String[] args) throws InterruptedException {
        Task task = new Task();
        MyThread1 thread1 = new MyThread1(task);
        thread1.start();
        Thread.sleep(100);
        MyThread2 thread2 = new MyThread2(task);
        thread2.start();
    }
}
